package com.frxuexi.lib_base

import com.google.gson.Gson
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.RequestBody

open class BaseRepository {

    fun mapToBody(map: Map<String,Any>):RequestBody{
        val json = Gson().toJson(map)
        val body = RequestBody.create("application/json".toMediaType(), json)
        return body
    }
}